Installation
============
Please see the provided document: Installing and Registering FSUIPC7.pdf


Usage Instructions
==================
FSUIPC7 as now a standalone executable, and no longer an embedded dll.
Simply run the FSUIPC7.exe to start.
Alternativly, if you opted to install the desktop shortcut, you can use this to
start MSFS with FSUIPC7. 

FSUIPC7 will then sit in the system tray (by default). To open, double-click the tray icon or
use the provided context menu. FSUIPC7 will start with the main window visible only when the
'Auto-Connect to FS' option is disabled.

A default windows hot key (currently Alt-F) is also acquired when you start FSUIPC7
which will display/open the FSUIPC7 main window. If this hot key cannot be acquired
(e.g. as its already in use) then a message will be logged. You can change the key
assigned by manually editing the following ini parameter:

InvokeFSUIPCOptionsKey=70,12

where, in the above example, 70 is the F key (0x46) and 12 is the modifier (which is
actually a hex value, 0x12 which is VK_MENU, i.e. the Alt key).

For no hot key, use

InvokeFSUIPCOptionsKey=No


Missing Functionality
=====================
The following functionality, available in previous versions, is not currently available in FSUIPC7 as
the facilites to implement them are not provided by the MSFS SDK:

1. Mouse Macros (and other mouse functionality, e.g “mouse look”, etc. MSFS uses HVARS (HRML variables) instead of mouse macros.
2. AI Traffic management (Traffic Limiter and Zapper): it is not possible to control AI except by the program that creates the AI.
   It will therefore not be possible to omplement these facilities.
   Note that the offsets for AI traffic are populated.
3. Text display facilities: pending SimConnect functionality (some basic functionality may work)
4. Menu facilities: pending SimConnect functionality
5. Weather: apart from a few variables concerning ambient conditions at the aircraft, no other weather information
   is available for reading or updating. It is not expected that MSFS will implement such facilities, and even if they
   do they will be radically different, and so no futher weather control will be provided by FSUIPC7.
6. Assignments to Xbox One and Xbox 360 game controllers only take effect when FSUIPC7 has the window focus.
   However, there is a work-around for this using a conversion utility called XInput Plus - see below.


Limitations
===========
Currently no documentation on what key events/controls from the SimConnect API are actually working.
Many do not currently work. These include:
   - events for view control
   - events for slew control
   - events for weather

For view and slew control, you can assign in MSFS or assign in FSUIPC7 but to the default key assignments
used for view/slew control in MSFS.

Text/message/menu display facilities: do not work due to issues with SimConnect_Text API function.
It is recommended to switch to using the lua Wnd library for textual display, but menu selection is not supported.

Keyboard input is not masked, and so any key assigned in FSUIPC (via any mechanism) will also be seen by the sim.
Keyboard input is also recognised when either MSFS or FSUIPC7 have the window focus.

XINPUT devices, such as the XBox One and XBox 360 controllers do not work natively with FSUIPC7.
If you want to use FSUIPC7 with such devices, you will need to install and configure a conversion utility called XInput Plus.
Please see the following tutorial:
    https://www.play-old-pc-games.com/compatibility-tools/xinput-plus-tutorial/
It has been reported that the UI for this utility is also now available in English.
Also note that you need to point this utility to the FSUIPC7.exe, not the MSFS.exe.
    

Problems running FSUIPC7
========================
1. If you receive the following error when running FSUIPC7:
        The code execution cannot proceed because VCRUNTIME140_1.dll was not found. Reinstalling the program may fix this problem.
   then you need to uninstall the 2015, 2017, 2019 & 2022 VC++ redistributables from the Windows App management panel (any/all that are installed),
   and then install the latest combined redistributable packages (both the x86 and x64 versions recommended, although FSUIPC7 only requires the x64 version)
   from here:
		https://docs.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist

2. If you receive a pop-up System Error from MSFS when auto-starting FSUIPC7, or when startung FSUIPC7 manually, please try the steps outlined in 1 above
   (i.e. re-install your VC++ redistributables).

3. FSUIPC7 does not auto-start with MSFS, even though this option was selected during installation.
   If you find that FSUIPC7 doesn't start with MSFS, this is usually due to a problem with your EXE.xml file. Please check your InstallFSUIPC7.log file.
   This is usually due to another add-on corrupting the EXE.xml file. To resolve, you can delete/rename your current EXE.xml file (whose location can be
   determined from your InstallFSUIPC7.log file) and re-install FSUIPC7. However, the add-on that corrupted the EXE.xml may not be started automatically.
   You will need to manually add this back if you want this app to also auto-start.
   Please see the following FAQ entry for further details on this as well as other possible causes:
       https://forum.simflight.com/topic/95918-fsuipc7-auto-start-with-msfs2020/
   I will NOT RESPOND to further support requests regarding this issue - I will reference this FAQ entry and close/lock the topic.
   If you must post, please use that topic referenced - but don't expect a reply, from me at least!

4. If, when running the installer, you are prompted for a password for a user with Admin privileges, then please cancel and do not install as doing so will
   install certain items (e.g. documents) in the wrong place. If you have already installed this way, please uninstall using the created uninstaller (or via
   the windows App management panel).
   This situation occurs when the user account installing FSUIPC7 doesn;t have admin privileges, which Windows automatically requests when running the
   installer (even though these are not needed by the installer). The correct way to install in such circumstances is to temporarily grant admin privileges
   to the user account under which you wish to install FSUIPC7. Once you have installed, you can remove this elevated priviege.
		
		
Documentation
=============
Documentation is now provided by the installer. Note that the documentation will be installed under your
Windows Documents folder, in an FSUIPC7 sub-folder.


Functionality to be Added
=========================
The following is a short list of some of the main work still to be done in FSUIPC7
(in no particular order):

1. Add registration facilities to FSUIPC7 application (especially for WideFS).
2. Re-instate functionality in offset 0x2FE0 ('Add-on' menu entries) but allow menu entries to be added to FSUIPC7 menu bar.
3. Add [Programs] section to profiles.


Feedback
========
Please use the following sub-forum for all FSUIPC7 / MSFS related issues:
        https://forum.simflight.com/forum/183-fsuipc7-for-msfs/

Please provide all relevant information and attach the relevant files/logs. For installation issues, this will be
your InstallFSUIPC7.log file, and for other issues your FSUIPC7.log file and FSUIPC7.ini file.
Before posting, please check the forum to see if your issue/problem has already been reported, as you may find a
solution there.


John Dowson, 11th January 2023